package edu.zju.gis.dbfg.server.constant;

import lombok.AllArgsConstructor;
import lombok.Getter;
import lombok.ToString;

/**
 * @author Hu
 * @date 2019/8/26
 **/
@Getter
@AllArgsConstructor
@ToString
public enum UserRole {

  User("user"), Admin("admin");

  String name;

  public static UserRole find(String name){
    switch (name){
      case "user": return User;
      case "admin": return Admin;
      default: return null;
    }
  }
}
